package com.syn.synold4s.adapter;

import android.content.Context;

import com.gaoyi.basemodule.baseAdapter.BaseAdapter;
import com.gaoyi.basemodule.baseAdapter.BaseViewHolder;
import com.syn.synold4s.R;
import com.syn.synold4s.bean.dto.SafetyTrainingDto;
import com.syn.synold4s.databinding.SafetyTrainingItemBinding;

public class SafetyTrainingAdapter extends BaseAdapter<SafetyTrainingItemBinding, SafetyTrainingDto> {
    public SafetyTrainingAdapter(Context context) {
        super(context);
    }

    @Override
    protected void setBindingVariable(SafetyTrainingItemBinding binding, int position) {
    }

    @Override
    protected void onBindItem(SafetyTrainingItemBinding binding, SafetyTrainingDto item, int position) {
        binding.safetyTrainingItem.setName(item.getStaffName() != null ? item.getStaffName() : "");
        binding.safetyTrainingItem.setTime(item.getStartTT());
        binding.safetyTrainingItem.setCurriculum(item.getCurriculum() != null ? item.getCurriculum() : "");
        binding.safetyTrainingItem.setFraction(item.getFractlonName() != null ? item.getFractlonName() : "---", item.getFractlon());
    }

    @Override
    protected void onCreateView(SafetyTrainingItemBinding binding, BaseViewHolder<SafetyTrainingItemBinding> holder) {

    }

    @Override
    protected int getLayoutResId() {
        return R.layout.safety_training_item;
    }
}
